Digital Wanderer

We live as long as we fly

CD and DVD Matrices - Part 2, Mathematical

   Having sorted out the geopolitical situation, let's move on to the mathematical part. What does "good" or "bad" quality mean? Unlike the recent discussions about Esperanto and Film vs Digital, which I foolishly got myself into, there are pretty strict criteria for evaluating blanks.
For starters - a quick example from the world of digital data storage.
   Let's assume we need to store eight numbers, each of which is a one or a zero (as we know, computers like ones and zeros, they have a quirk like that, they can't stand other digits). Let's take these: 0 0 1 0 1 0 1 1. How do we verify that when reading from the disc we read what we were supposed to, and didn't make a mistake? Add a ninth one, which will control the correctness of the previous ones. But how do we do that? Bright minds came up with this trick: we take all the previous numbers, add them up, divide evenly by 2 and take the remainder. This remainder will be the ninth number, verifying the correctness of the previous ones.
0+0+1+0+1+0+1+1=4
4 / 2= 2 and a remainder of 0
So we get : 0 0 1 0 1 0 1 1 0
Now let's suppose that one of the numbers was read from the disc incorrectly, specifically the first one.
1 0 1 0 1 0 1 1 0
Let's perform the operation described above.
1+0+1+0+1+0+1+1=5
5 / 2 = 2 and a remainder of 1
But the control number we read is equal to 0! That means either the ninth (control) number, or one of the eight was read incorrectly.
   What I provided above is a primitive scheme for data integrity checking. It is capable of finding only single errors - if two numbers out of the eight change at once, it will show that everything is in order. And it is incapable of correcting errors - for that you'll have to try reading the data once more.
  On CDs, and especially on DVDs, complex schemes of redundant coding are used, allowing not only to find errors, but also to correct them, if their quantity is within reasonable limits. This is done to offset the inevitable defects in the material of the matrices, errors in the DVD drive mechanics and laser operation. If it weren't for the described schemes, DVD drives and computers in general would cost a massive amount of money, would work extremely unreliably and slowly, since producing perfect transistors, blanks and lasers is incredibly expensive, and sometimes completely impossible. And of course, without error checking and correction the emergence of our beloved internet would have become impossible.